<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * Empresas filter form base class.
 *
 * @package    espazio
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 13459 2008-11-28 14:48:12Z fabien $
 */
class BaseEmpresasFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'nombre'         => new sfWidgetFormFilterInput(),
      'url'            => new sfWidgetFormFilterInput(),
      'logo'           => new sfWidgetFormFilterInput(),
      'provincia'      => new sfWidgetFormFilterInput(),
      'pais'           => new sfWidgetFormFilterInput(),
      'multinacional'  => new sfWidgetFormFilterInput(),
      'forma_juridica' => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'nombre'         => new sfValidatorPass(array('required' => false)),
      'url'            => new sfValidatorPass(array('required' => false)),
      'logo'           => new sfValidatorPass(array('required' => false)),
      'provincia'      => new sfValidatorPass(array('required' => false)),
      'pais'           => new sfValidatorPass(array('required' => false)),
      'multinacional'  => new sfValidatorPass(array('required' => false)),
      'forma_juridica' => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('empresas_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Empresas';
  }

  public function getFields()
  {
    return array(
      'id'             => 'Number',
      'nombre'         => 'Text',
      'url'            => 'Text',
      'logo'           => 'Text',
      'provincia'      => 'Text',
      'pais'           => 'Text',
      'multinacional'  => 'Text',
      'forma_juridica' => 'Text',
    );
  }
}
